
//
// 121213 - AH - Created.
// 121227a- AH - EMPTY_ARRAY.
// 121227b- AH - log methods no longer accepts LogFormater, LogFormater objects
//               now is to be members of LogSink implementation.
// 121227c- AH - rlog(Class<?>, String, String).
//

package org.japril.jutil.logging;

/**
 * <p>
 *   Interface for objects that is responsible for 'printing' log messages.
 * </p>
 * @author Arne Halvorsen (AH)
 */
public interface LogSink 
{
  /**
   * <p>
   *   Receives data for normal logging.
   * </p>
   * @param clazz  {@link Class} doing logging, can be {@code null}.
   * @param method Name on method logging, can be {@code null}.
   * @param msg    Message, if {@code null} nothing is done.
   */
  void log(Class<?> clazz, String method, String msg);
  
  /**
   * <p>
   *   Receives data for raw (not formatted) logging.
   * </p>
   * @param clazz  {@link Class} doing logging, can be {@code null}.
   * @param method Name on method logging, can be {@code null}.
   * @param msg    Message, if {@code null} nothing is done.
   */
  void rlog(Class<?> clazz, String method, String msg);
  
  /**
   * <p>
   *   The empty array shared.
   * </p>
   */
  public static final LogSink[] EMPTY_ARRAY=new LogSink[0];
  
}
